import { defineUniPages } from "@uni-helper/vite-plugin-uni-pages";

export default defineUniPages({
  easycom: {
    autoscan: true,
    custom: {
      "^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "z-paging/components/z-paging$1/z-paging$1.vue",
      "^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue"
    }
  },
  pages: [{
    path: "pages/home/index",
    type: "home",
    isHomePage: true,
    style: {
      navigationBarTitleText: "首页",
      enablePullDownRefresh: false
    }
  },
  {
    path: "pages/facility/index",
    style: {
      navigationBarTitleText: "设备",
      enablePullDownRefresh: false
    }
  },

  {
    path: "pages/program/index",
    style: {
      navigationBarTitleText: "节目单",
      enablePullDownRefresh: false
    }
  },
  {
    path: "pages/cuisine/index",
    style: {
      navigationBarTitleText: "菜品",
      enablePullDownRefresh: false
    }
  },
  {
    path: "pages/mine/index",
    style: {
      navigationBarTitleText: "我的",
      enablePullDownRefresh: false
    }
  },
  {
    path: "pages/login/index",
    type: "login",
    isLoginPage: true,
    style: {
      navigationBarTitleText: "登录",
      enablePullDownRefresh: false
    }
  },
  {
    path: "pages/login/forget",
    type: "login",
    isLoginPage: true,
    style: {
      navigationBarTitleText: "找回密码",
      enablePullDownRefresh: false
    }
  }],
  tabBar: {
    custom: true,
    color: "#222222",
    height: "0",
    selectedColor: "#1E90FF",
    list: [
      {
        pagePath: "pages/home/index",
        text: "首页",
        icon: "home",
        iconImg: "/static/tabbar/home.png",
        selectedIcon: "/static/tabbar/home_1.png"
        // #ifdef MP-WEIXIN
        // #endif
      },
      {
        pagePath: "pages/facility/index",
        text: "设备",
        icon: "facility",
        iconImg: "/static/tabbar/facility.png",
        selectedIcon: "/static/tabbar/facility_1.png"
      },
      {
        pagePath: "pages/program/index",
        text: "模板",
        icon: "program",
        iconImg: "/static/tabbar/program.png",
        selectedIcon: "/static/tabbar/program_1.png"
        // #ifdef MP-WEIXIN
        // #endif
      },
      {
        pagePath: "pages/cuisine/index",
        text: "菜品",
        icon: "cuisine",
        iconImg: "/static/tabbar/cuisine.png",
        selectedIcon: "/static/tabbar/cuisine_1.png"
      },
      {
        pagePath: "pages/mine/index",
        text: "我的",
        icon: "mine",
        iconImg: "/static/tabbar/user.png",
        selectedIcon: "/static/tabbar/user_1.png"
        // #ifdef MP-WEIXIN
        // #endif
      }]
  },
  subPackages: [
    {
      root: "subpackages/screen",
      pages: [
        {
          path: "pages/split",
          style: {
            navigationBarTitleText: "选择分屏",
            enablePullDownRefresh: false,
            navigationStyle: "custom"
          }
        },
        {
          path: "pages/pmd",
          style: {
            navigationBarTitleText: "跑马灯发布",
            enablePullDownRefresh: false,
            navigationStyle: "custom"
          }
        },
        {
          path: "pages/demo",
          style: {
            navigationBarTitleText: "跑马灯发布",
            enablePullDownRefresh: false,
            navigationStyle: "custom"
          }
        },
      ]
    },
    {
      root: "subpackages/device",
      pages: [
        {
          path: "pages/bind",
          style: {
            navigationBarTitleText: "绑定设备",
            enablePullDownRefresh: false,
            navigationStyle: "custom"
          }
        },
      ]
    },
    {
      root: "subpackages/booking",
      pages: [
        {
          path: "pages/booking",
          style: {
            navigationBarTitleText: "预约",
            enablePullDownRefresh: false,
            navigationStyle: "custom"
          }
        },
        {
          path: "pages/bookingRes",
          style: {
            navigationBarTitleText: "预约结果",
            enablePullDownRefresh: false,
            navigationStyle: "custom"
          }
        },
        {
          path: "pages/queuing",
          style: {
            navigationBarTitleText: "排队叫号",
            enablePullDownRefresh: false,
            navigationStyle: "custom"
          }
        },
      ]
    },
  ],
  preloadRule: {},
  globalStyle: {
    navigationStyle: "custom",
    pageOrientation: "portrait",
    navigationBarTextStyle: "black",
    navigationBarBackgroundColor: "#ffffff",
    "h5": {
      navigationBarTitleText: ""
    },
    "mp-weixin": {
      handleWebviewPreload: "auto",
      visualEffectInBackground: "none"
    },
    "app-plus": {
      bounce: "none"
    }
  }
});